﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace crm_data
{
    /// <summary>
    /// 订单发票表
    /// </summary>
    [Table("basics_order_invoice")]
    public class OrderInvoice : Entity
    {
        #region Model 实体属性

        /// <summary>
        /// 是否增值税发票
        /// </summary>
        public InvoiceTypeEnum IsVat { get; set; } = InvoiceTypeEnum.Ordinary;
        /// <summary>
        /// 发票抬头名称
        /// </summary>
        public string InvoiceTitle { get; set; }
        /// <summary>
        /// 发票抬头内容
        /// </summary>
        public string InvoiceContent { get; set; }
        /// <summary>
        /// 发票金额
        /// </summary>
        public decimal InvoiceAmount { get; set; }
        /// <summary>
        /// 发票税号
        /// </summary>
        public string InvoiceTaxNo { get; set; }
        /// <summary>
        /// 开票税金
        /// </summary>
        public decimal InvoiceTax { get; set; }
        /// <summary>
        /// 公司名称[增值税]
        /// </summary>
        public string VatCompanyName { get; set; }
        /// <summary>
        /// 公司地址[增值税]
        /// </summary>
        public string VatCompanyAddress { get; set; }
        /// <summary>
        /// 联系电话[增值税]
        /// </summary>
        public string VatTelphone { get; set; }
        /// <summary>
        /// 开户银行[增值税]
        /// </summary>
        public string VatBankName { get; set; }
        /// <summary>
        /// 银行帐号[增值税]
        /// </summary>
        public string VatBankAccount { get; set; }
        /// <summary>
        /// 开票时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 订单标识
        /// </summary>
        public Guid OrderGuid { get; set; }

        #endregion Model 实体属性

        /// <summary>
        /// 订单信息
        /// </summary>
        public virtual Order Order { get; set; }
    }
}
